{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "加法std 4.847111997537467 平方和 4.445199614034953\n",
      "乘法std 0.44099643739986116 相对标准偏差平方和std 0.41345894026385693\n"
     ]
    }
   ],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "n=100  #产生的数据量\n",
    "\n",
    "result1 = np.random.normal(15, 2, n) # 均值为15,方差为2\n",
    "result2 = np.random.normal(10, 4, n) # 均值为0.5,方差为1\n",
    "result3=result1 +result2 \n",
    "result4=result1 *result2 \n",
    "\n",
    "#加法，是标准偏差相加，乘法是相对标准偏差相加\n",
    "std1=np.sqrt(result2.std()**2+result1.std()**2)\n",
    "std2=np.sqrt((result2.std()/result2.mean())**2+(result1.std()/result1.mean())**2)\n",
    "print(\"加法std\",result3.std(),\"平方和\",std1)\n",
    "print(\"乘法std\",result4.std()/result4.mean(),\"相对标准偏差平方和std\",std2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "15.142494286513399 1.9466887960337476\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYsAAAEWCAYAAACXGLsWAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAIABJREFUeJzt3Xd4lGX69vHvlUaTTugdQaUjoYiIDRDXggUERRZURFTW9tu17K6Kuu5a1i5SVASVpiiKu6jYUKmGpgJSQo9IV0Apadf7x4z7jjEwA2QyITk/x5EjT7nvZ64ZSM487X7M3RERETmcuFgXICIihZ/CQkREwlJYiIhIWAoLEREJS2EhIiJhKSxERCQshYUUO2Y21sz+YWZnmNnKfNz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YCdwWbz3H1ITAosAHl9Bu7+csj69UCKuxfZX5SH+H/wGjAGaA1kAH92909jVWM0HeL9rwSeIXA47gBwk7svjFWN0WZmnYEvgW8J7EUC/JXAeYs3gLoErgzs7e55XRASvdoUFiIiEo4OQ4mISFgKCxERCUthISIiYSksREQkLIWFiIiEpbAQEZGwFBYiIhKWwkIkSsysXfB5JCXNrEzw+QTNY12XyNHQTXkiUWRm/wBKAqWAdHf/V4xLEjkqCguRKDKzJCCVwFAVndw9O8YliRwVHYYSia5KwAlAWQJ7GCLHJe1ZiESRmU0DJhEYbr2Guw+NcUkiRyUh1gWIFFVm9kcgy90nmFk8MMfMzimqo8ZK0aY9CxERCUvnLEREJCyFhYiIhKWwEBGRsBQWIiISlsJCRETCUliIiEhYCgsREQnr/wGl0yHUXZ9+GgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 根据均值、标准差,求指定范围的正态分布概率值\n",
    "def normfun(x, mu, sigma):\n",
    "    pdf = np.exp(-((x - mu)**2)/(2*sigma**2)) / (sigma * np.sqrt(2*np.pi))\n",
    "    return pdf\n",
    "x = np.arange(min(result1), max(result1), 0.1)# 设定 y 轴，载入刚才的正态分布函数\n",
    "print(result1.mean(), result1.std())\n",
    "y = normfun(x, result.mean(), result.std())\n",
    "plt.plot(x, y) # 这里画出理论的正态分布概率曲线\n",
    " \n",
    "# 这里画出实际的参数概率与取值关系\n",
    "plt.hist(result1, bins=20, rwidth=0.8, density=True) # bins个柱状图,宽度是rwidth(0~1),=1没有缝隙\n",
    "plt.title('distribution')\n",
    "plt.xlabel('x')\n",
    "plt.ylabel('probability')\n",
    "# 输出\n",
    "plt.show() "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
